/PROG  TESTLVBAN
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "LV BAN0402";
PROG_SIZE	= 3889;
CREATE		= DATE 20-04-02  TIME 16:07:40;
MODIFIED	= DATE 20-04-17  TIME 11:02:28;
FILE_NAME	= PNS0051;
VERSION		= 0;
LINE_COUNT	= 144;
MEMORY_SIZE	= 4369;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0051 ;
   7:  !  PART:53301125  ;
   8:  !ZYL15-7-16********************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.1    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  //R[5:SPEED]=10    ;
  24:  R[32:CYCLE COUNT]=0    ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  28:   ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:  JMP LBL[10] ;
  33:   ;
  34:  LBL[5] ;
  35:  PR[6:PICK POSTION]=PR[7:PNS70 PS]    ;
  36:  R[32:CYCLE COUNT]=0    ;
  37:  JMP LBL[10] ;
  38:   ;
  39:  !***DO NOT RUN THIS LBL8*** ;
  40:  LBL[8] ;
  41:  JMP LBL[10] ;
  42:  PR[7:PNS70 PS]=PR[6:PICK POSTION]    ;
  43:   ;
  44:  LBL[10:TOP OF LOOF] ;
  45:   ;
  46:  TIMER[3]=STOP ;
  47:  TIMER[2]=STOP ;
  48:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  49:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  50:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  51:  R[8:R MOVE TIME]=TIMER[3]    ;
  52:  TIMER[2]=RESET ;
  53:  TIMER[2]=START ;
  54:  TIMER[3]=RESET ;
  55:   ;
  56:  !PROCEED TO PICK ;
  57:  LBL[20] ;
  58:   ;
  59:  IF DI[1:P1 PICK ENTRY OK]=ON AND DI[3:FROM RL1 CLEAR]=ON AND DI[40:PART IN PRS]=ON,JMP LBL[25] ;
  60:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  61:  JMP LBL[20] ;
  62:   ;
  63:  LBL[25] ;
  64:  TIMER[3]=START ;
  65:  PR[6,3:PICK POSTION]=PR[6,3:PICK POSTION]-1.5    ;
  66:  R[32:CYCLE COUNT]=R[32:CYCLE COUNT]+1    ;
  67:J P[3:PICK APPROACH] 100% CNT30 ACC100    ;
  68:L PR[6:PICK POSTION] 1000mm/sec CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  69:  PAYLOAD[4] ;
  70:  CALL CHK_PICK    ;
  71:  MONITOR Z_CHECH ;
  72:L P[5:PICK DEPART] 200mm/sec CNT5 ACC100 TB   2.00sec,DO[40:AIR ON]=PULSE,3.0sec    ;
  73:L P[6:PICK LIFT] 500mm/sec CNT20 ACC100    ;
  74:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  75:   ;
  76:  IF DI[39:Single BLANK]=ON,JMP LBL[27] ;
  77:  JMP LBL[30] ;
  78:  LBL[27:DROP D BLANK] ;
  79:  MONITOR END Z_CHECH ;
  80:J P[14] 100% CNT100 ACC100    ;
  81:J P[15:DROP DOUBLE] 100% CNT10 ACC100 TB R[19]sec,CALL PARTDROP BREAK    ;
  82:J P[16] 100% CNT100 ACC100    ;
  83:  //PR[6,3:PICK POSTION]=PR[6,3:PICK POSTION]-1.5    ;
  84:J P[2:PICK POUNCE] 100% CNT70 ACC100    ;
  85:  JMP LBL[20] ;
  86:   ;
  87:   ;
  88:  LBL[30:GOTO DROP POUNCE] ;
  89:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  90:   ;
  91:  TIMER[3]=STOP ;
  92:  LBL[40:AT DROP POUNCE] ;
  93:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON,JMP LBL[80] ;
  94:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P2 DROP ENTRY]=ON,JMP LBL[50] ;
  95:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  96:  JMP LBL[40] ;
  97:   ;
  98:  LBL[50:MOVE DROP SNEAK] ;
  99:  TIMER[3]=START ;
 100:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
 101:  LBL[51:DROP OR C-P-S] ;
 102:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
 103:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
 104:  JMP LBL[51] ;
 105:  JMP LBL[50] ;
 106:   ;
 107:  LBL[60:MOVE CLS-PRS-ACC] ;
 108:J P[1:MIDDLE] 50% CNT100 ACC100    ;
 109:  PAUSE ;
 110:  JMP LBL[30] ;
 111:   ;
 112:  LBL[80:DROP ENABLED] ;
 113:  TIMER[3]=START ;
 114:  !PROCEED TO DROP ;
 115:J P[10:DROP APPROACH] 100% CNT30 ACC100    ;
 116:  MONITOR END Z_CHECH ;
 117:J P[11:DROP] 100% CNT0 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 118:  PAYLOAD[3] ;
 119:  CALL CHK_DROP    ;
 120:   ;
 121:J P[12:DROP DEPART] 100% CNT60 ACC100    ;
 122:J P[13:DROP CLEAR] 100% CNT100 ACC100    ;
 123:   ;
 124:  !GOTO PICK POUNCE ;
 125:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 126:  IF DI[40:PART IN PRS]=OFF,JMP LBL[86] ;
 127:  JMP LBL[89] ;
 128:   ;
 129:  LBL[86] ;
 130:  DO[22:P1_ADC START]=PULSE,3.0sec ;
 131:  JMP LBL[89] ;
 132:  LBL[89] ;
 133:   ;
 134:   ;
 135:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 136:  JMP LBL[10] ;
 137:   ;
 138:  LBL[90:END OF CYCLE] ;
 139:  TIMER[1]=STOP ;
 140:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 141:J P[1:MIDDLE] 50% CNT100    ;
 142:  MOVE TO HOME    ;
 143:   ;
 144:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.455  mm,	Y =     -.007  mm,	Z = -1320.321  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2162.015  mm,	Y =  1575.890  mm,	Z =  -786.371  mm,
	W =   179.441 deg,	P =      .436 deg,	R =   142.049 deg,
	E1=   142.100 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2673.955  mm,	Y =  3222.811  mm,	Z =  -791.429  mm,
	W =   179.702 deg,	P =     -.285 deg,	R =    89.798 deg,
	E1=   195.936 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2674.115  mm,	Y =  3222.731  mm,	Z = -1206.322  mm,
	W =   179.701 deg,	P =     -.288 deg,	R =    89.796 deg,
	E1=   195.937 deg
};
P[6:"PICK LIFT"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2673.955  mm,	Y =  3222.811  mm,	Z =  -821.829  mm,
	W =   179.702 deg,	P =     -.285 deg,	R =    89.798 deg,
	E1=   195.936 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2253.037  mm,	Y =  1857.896  mm,	Z =  -817.533  mm,
	W =   179.504 deg,	P =      .283 deg,	R =   136.430 deg,
	E1=   147.816 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2103.845  mm,	Y = -1173.335  mm,	Z =  -850.000  mm,
	W =  -179.530 deg,	P =      .624 deg,	R =  -154.211 deg,
	E1=    78.520 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2244.630  mm,	Y = -2029.414  mm,	Z =  -788.574  mm,
	W =  -179.265 deg,	P =      .309 deg,	R =  -132.569 deg,
	E1=    56.886 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2662.398  mm,	Y = -3232.742  mm,	Z =  -799.624  mm,
	W =  -179.284 deg,	P =     -.357 deg,	R =   -95.033 deg,
	E1=    22.213 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2662.397  mm,	Y = -3232.742  mm,	Z = -1090.024  mm,
	W =  -179.284 deg,	P =     -.357 deg,	R =   -95.033 deg,
	E1=    22.213 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2662.398  mm,	Y = -3232.742  mm,	Z =  -799.624  mm,
	W =  -179.284 deg,	P =     -.357 deg,	R =   -95.033 deg,
	E1=    22.213 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2064.432  mm,	Y = -1287.326  mm,	Z =  -875.437  mm,
	W =  -179.493 deg,	P =      .586 deg,	R =  -151.481 deg,
	E1=    75.955 deg
};
P[14]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1854.760  mm,	Y =  1109.562  mm,	Z = -1088.630  mm,
	W =   179.632 deg,	P =      .438 deg,	R =   156.630 deg,
	E1=   167.002 deg
};
P[15:"DROP DOUBLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1701.677  mm,	Y =   124.688  mm,	Z = -1764.797  mm,
	W =   179.838 deg,	P =      .550 deg,	R =  -179.743 deg,
	E1=   192.383 deg
};
P[16]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1854.760  mm,	Y =  1109.562  mm,	Z = -1088.630  mm,
	W =   179.632 deg,	P =      .438 deg,	R =   156.630 deg,
	E1=   167.002 deg
};
/END
